package com.infotel.media;

public class Navigateur implements Comparable<Navigateur> {
    private String browser;
    private String version;

    public Navigateur(String browser, String version) {

        this.version = version;
        this.browser = browser;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Override
    public boolean equals(Object o){
        return (this.browser.equals(((Navigateur)o).getBrowser()) && 
                (this.version.equals(((Navigateur)o).getVersion())));
        
    }

    @Override
    public int hashCode() {
        return this.browser.hashCode();
    }

    @Override
    public int compareTo(Navigateur o) {
        return this.browser.compareTo(((Navigateur) o).getBrowser());
    }

}
